//用户路由
const express = require('express')
const router = express.Router()

router.get('/users',(req,res)=>{
    res.json({message:'获取用户列表',status:'运行中',data:[{id:1,name:'张三',age:18},{id:2,name:'李四',age:20}]})
})

router.get('/users/:id',(req,res)=>{
    res.json({message:'单个用户',status:'运行中',data:{id:req.params.id,name:'张三',age:18}})
})

module.exports = router



